package org.jctc.els.modules.biz.entity.message;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * <p>
 * 消息与人员关联表
 * </p>
 *
 * @author lyh
 * @since 2021-02-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("jtc_message_user")
@ApiModel(value="MessageUser对象", description="消息与人员关联表")
public class MessageUser extends Model<MessageUser> {

   // private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    @JsonSerialize(using= ToStringSerializer.class)
    private Long id;

    @ApiModelProperty(value = "接收人ID")
    private Long userId;

    @ApiModelProperty(value = "消息ID")
    private Long messageId;

    @ApiModelProperty(value = "发布对象的编码")
    private String code;

    @ApiModelProperty(value = "( 1:已读; 0:未读)")
    private Integer readFlag;

    @ApiModelProperty(value = "是否删除标识1：是  0：否")
    private Integer deleteFlag;

    private Date createTime;


    /**  @Override
    protected Serializable pkVal() {
        return this.id;
    }
    **/
}
